package cn.liwq.demo.java.raw.ver8.lambda.entry;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;

public class Artist {

    private String name;

    private String nationality;

    private List<Artist> members;

    public Stream<Artist> getMembers() {
        return members.stream();
    }

    public void addMembers(Artist artist) {
        this.members.add(artist);
    }

    public Artist() {}

    public Artist(String name, String nationality) {
        this.name = name;
        this.nationality = nationality;
        this.members = new ArrayList<>();
        this.members.add(this);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNationality() {
        return nationality;
    }

    public void setNationality(String nationality) {
        this.nationality = nationality;
    }
}
